package com.dfbz.springboot_project.entity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Date;
import java.util.Objects;

@Entity
public class Account {
    private Integer accountId;
    private Integer accountRecommenderId;
    private String accountLoginName;
    private String accountLoginPasswd;
    private String accountStatus;
    private Date accountCreateDate;
    private Date accountPauseDate;
    private Date accountCloseDate;
    private String accountRealName;
    private String accountIdcardNo;
    private Date accountBirthdate;
    private String accountGender;
    private String accountOccupation;
    private String accountTelephone;
    private String accountEmail;
    private String accountMailAddress;
    private String accountZipcode;
    private String accountQq;
    private Date accountLastLoginTime;
    private String accountLastLoginIp;


    @Id
    @Column(name = "account_id", nullable = false)
    public Integer getAccountId() {
        return accountId;
    }

    public void setAccountId(Integer accountId) {
        this.accountId = accountId;
    }

    @Basic
    @Column(name = "account_recommender_id", nullable = true)
    public Integer getAccountRecommenderId() {
        return accountRecommenderId;
    }

    public void setAccountRecommenderId(Integer accountRecommenderId) {
        this.accountRecommenderId = accountRecommenderId;
    }

    @Basic
    @Column(name = "account_login_name", nullable = false, length = 30)
    public String getAccountLoginName() {
        return accountLoginName;
    }

    public void setAccountLoginName(String accountLoginName) {
        this.accountLoginName = accountLoginName;
    }

    @Basic
    @Column(name = "account_login_passwd", nullable = false, length = 30)
    public String getAccountLoginPasswd() {
        return accountLoginPasswd;
    }

    public void setAccountLoginPasswd(String accountLoginPasswd) {
        this.accountLoginPasswd = accountLoginPasswd;
    }

    @Basic
    @Column(name = "account_status", nullable = true, length = 1)
    public String getAccountStatus() {
        return accountStatus;
    }

    public void setAccountStatus(String accountStatus) {
        this.accountStatus = accountStatus;
    }

    @Basic
    @Column(name = "account_create_date", nullable = true)
    public Date getAccountCreateDate() {
        return accountCreateDate;
    }

    public void setAccountCreateDate(Date accountCreateDate) {
        this.accountCreateDate = accountCreateDate;
    }

    @Basic
    @Column(name = "account_pause_date", nullable = true)
    public Date getAccountPauseDate() {
        return accountPauseDate;
    }

    public void setAccountPauseDate(Date accountPauseDate) {
        this.accountPauseDate = accountPauseDate;
    }

    @Basic
    @Column(name = "account_close_date", nullable = true)
    public Date getAccountCloseDate() {
        return accountCloseDate;
    }

    public void setAccountCloseDate(Date accountCloseDate) {
        this.accountCloseDate = accountCloseDate;
    }

    @Basic
    @Column(name = "account_real_name", nullable = false, length = 20)
    public String getAccountRealName() {
        return accountRealName;
    }

    public void setAccountRealName(String accountRealName) {
        this.accountRealName = accountRealName;
    }

    @Basic
    @Column(name = "account_idcard_no", nullable = false, length = 18)
    public String getAccountIdcardNo() {
        return accountIdcardNo;
    }

    public void setAccountIdcardNo(String accountIdcardNo) {
        this.accountIdcardNo = accountIdcardNo;
    }

    @Basic
    @Column(name = "account_birthdate", nullable = true)
    public Date getAccountBirthdate() {
        return accountBirthdate;
    }

    public void setAccountBirthdate(Date accountBirthdate) {
        this.accountBirthdate = accountBirthdate;
    }

    @Basic
    @Column(name = "account_gender", nullable = true, length = 1)
    public String getAccountGender() {
        return accountGender;
    }

    public void setAccountGender(String accountGender) {
        this.accountGender = accountGender;
    }

    @Basic
    @Column(name = "account_occupation", nullable = true, length = 50)
    public String getAccountOccupation() {
        return accountOccupation;
    }

    public void setAccountOccupation(String accountOccupation) {
        this.accountOccupation = accountOccupation;
    }

    @Basic
    @Column(name = "account_telephone", nullable = false, length = 15)
    public String getAccountTelephone() {
        return accountTelephone;
    }

    public void setAccountTelephone(String accountTelephone) {
        this.accountTelephone = accountTelephone;
    }

    @Basic
    @Column(name = "account_email", nullable = true, length = 50)
    public String getAccountEmail() {
        return accountEmail;
    }

    public void setAccountEmail(String accountEmail) {
        this.accountEmail = accountEmail;
    }

    @Basic
    @Column(name = "account_mail_address", nullable = true, length = 50)
    public String getAccountMailAddress() {
        return accountMailAddress;
    }

    public void setAccountMailAddress(String accountMailAddress) {
        this.accountMailAddress = accountMailAddress;
    }

    @Basic
    @Column(name = "account_zipcode", nullable = true, length = 6)
    public String getAccountZipcode() {
        return accountZipcode;
    }

    public void setAccountZipcode(String accountZipcode) {
        this.accountZipcode = accountZipcode;
    }

    @Basic
    @Column(name = "account_qq", nullable = true, length = 15)
    public String getAccountQq() {
        return accountQq;
    }

    public void setAccountQq(String accountQq) {
        this.accountQq = accountQq;
    }

    @Basic
    @Column(name = "account_last_login_time", nullable = true)
    public Date getAccountLastLoginTime() {
        return accountLastLoginTime;
    }

    public void setAccountLastLoginTime(Date accountLastLoginTime) {
        this.accountLastLoginTime = accountLastLoginTime;
    }

    @Basic
    @Column(name = "account_last_login_ip", nullable = true, length = 15)
    public String getAccountLastLoginIp() {
        return accountLastLoginIp;
    }

    public void setAccountLastLoginIp(String accountLastLoginIp) {
        this.accountLastLoginIp = accountLastLoginIp;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Account account = (Account) o;
        return accountId == account.accountId &&
                Objects.equals(accountRecommenderId, account.accountRecommenderId) &&
                Objects.equals(accountLoginName, account.accountLoginName) &&
                Objects.equals(accountLoginPasswd, account.accountLoginPasswd) &&
                Objects.equals(accountStatus, account.accountStatus) &&
                Objects.equals(accountCreateDate, account.accountCreateDate) &&
                Objects.equals(accountPauseDate, account.accountPauseDate) &&
                Objects.equals(accountCloseDate, account.accountCloseDate) &&
                Objects.equals(accountRealName, account.accountRealName) &&
                Objects.equals(accountIdcardNo, account.accountIdcardNo) &&
                Objects.equals(accountBirthdate, account.accountBirthdate) &&
                Objects.equals(accountGender, account.accountGender) &&
                Objects.equals(accountOccupation, account.accountOccupation) &&
                Objects.equals(accountTelephone, account.accountTelephone) &&
                Objects.equals(accountEmail, account.accountEmail) &&
                Objects.equals(accountMailAddress, account.accountMailAddress) &&
                Objects.equals(accountZipcode, account.accountZipcode) &&
                Objects.equals(accountQq, account.accountQq) &&
                Objects.equals(accountLastLoginTime, account.accountLastLoginTime) &&
                Objects.equals(accountLastLoginIp, account.accountLastLoginIp);
    }

    @Override
    public int hashCode() {
        return Objects.hash(accountId, accountRecommenderId, accountLoginName, accountLoginPasswd, accountStatus, accountCreateDate, accountPauseDate, accountCloseDate, accountRealName, accountIdcardNo, accountBirthdate, accountGender, accountOccupation, accountTelephone, accountEmail, accountMailAddress, accountZipcode, accountQq, accountLastLoginTime, accountLastLoginIp);
    }
}
